import {useState, useEffect} from "react";
import {HTTP} from "@/utils/http.ts";

const useGenderData = () => {
    type DataItem = Array<object>
    const [GenderData, setData] = useState<DataItem>([]);

    useEffect(() => {
        async function getData() {
            const res = await HTTP.get("/get_gender");
            setData(res.data);
        }
        getData();
    }, []);

    return {GenderData}
}

export default useGenderData;